package commonClasses;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;


public class Count {

	public static void main(String args[]) throws IOException{
PrintStream ps=new PrintStream("J:\\BC3_IMT_Training\\count.txt");

		FileReader fr=new FileReader("J:\\BC3_IMT_Training\\table.txt");
		BufferedReader fbr=new BufferedReader(fr);
		
		String str=fbr.readLine();
		while(str!=null){
			String[] arr=str.split("\t");
			
			String t= arr[1];
			String[]ta=t.split(" ");
			String f= arr[3];
			int tcount=Integer.parseInt(arr[4]);
			int tp=0;
			for(int i=0;i<ta.length;i++){
				if(f.contains(ta[i])){
					tcount--;
					tp++;
				}
				
			
			
			}
			int ar2=Integer.parseInt(arr[2]);
			double tp2=tp;
			int temp=tp+tcount;
			double precision = (tp2/temp);
			double recall = (tp2/ar2);
			ps.println(str+" "+tp+" "+tcount+" "+precision+" "+recall);
			
			str=fbr.readLine();
			
		}
	}
}
